﻿using Panorama.Web.CustomAttributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;

namespace Panorama.Web.ViewModels
{
    public class RegisterViewModel
    {
        [Required]
        [Display(Name = "User name:")]
        [UserNameValidator(ErrorMessage = "Invalid Username length")]
        public string UserName { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Password:")]
        [PasswordValidator(ErrorMessage = "Invalid Password length")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm password:")]
        [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }
      
        [Display(Name = "Domains:")]
        [DataType(DataType.Text)]
        public List<System.Web.Mvc.SelectListItem> Domains { get; set; }

        public int SelectedDomain { get; set; }

        [Display(Name = "Domains")]
        public bool IsDomain { get; set; }
        
        public RegisterViewModel()
        {
            this.Domains =
                new List<System.Web.Mvc.SelectListItem>()
                {
                    new System.Web.Mvc.SelectListItem() { Value = "1", Text = "MOBILTEL" }
                };
        }
    }
}